package com.jumi.microservice.constant;

import com.jumi.microservice.common.exception.BusinessExceptionAssert;

/**
 * @author Administrator
 */

public enum GoodsEnum implements BusinessExceptionAssert {
    /**
     * 商品异常处理
     */
    GOODS_HAS_EXISTED(500,"商品名称已经存在"),
    GOODS_HAS_DELETED(500,"该商品不存在"),
    GOODS_STATUS_ABLED(500,"存在上架状态的商品,不能删除"),
    GOODS_STATUS_ABLED_FIXED(500,"存在定时上架状态的商品,不能删除"),
    EXCELLENT_ACTIVITY_GOODS_EXIST(500,"该商品已经添加到聚米优品, 不能删除"),
    YOUXUAN_ACTIVITY_GOODS_EXIST(500,"该商品已经添加到聚米优选, 不能删除"),
    SMALL_SHOP_ACTIVITY_EXIST(500,"该商品已经添加到聚米小店,不能删除"),
    RECOMMOND_ACTIVITY_GOODS_EXIST(500,"该商品已经添加到今日推荐,不能删除"),
    PURCHASELIMIT_ACTIVITY_EXIST(500,"该商品已经添加到限购,不能删除"),
    POSTAGE_GOODS_ACTIVITY_EXIST(500,"该商品已经添加到付邮领,不能删除"),
    ;
    private final Integer code;

    private final String message;

    GoodsEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    @Override
    public Integer getCode() {
        return this.code;
    }

    @Override
    public String getMessage() {
        return this.message;
    }
}
